package org.peoples.tests.rooms;

import java.util.Date;

import junit.framework.TestCase;

import org.junit.Before;
import org.junit.Test;
import org.peoples.rooms.Room;
import org.peoples.rooms.RoomProperties;

public class TestRoom extends TestCase {
	
	Room room;
	
	public TestRoom(String name) {
		super(name);
	}
	
	@Before
	public void setUp() throws Exception {
		RoomProperties prop = new RoomProperties();
		prop.ID = 1;
		prop.name = "Room 1";
		prop.description = "Room 1 Description";
		prop.creationDate = new Date();
		
		room = new Room(prop);
	}

	@Test
	public void testEqualsObject() {
		RoomProperties prop2 = new RoomProperties();
		prop2.ID = 2;
		prop2.name = "Room 1";
		prop2.description = "Room 2 Description";
		prop2.creationDate = new Date();
		
		Room room2 = new Room(prop2);
		
		assertEquals("room == room2", room, room2);
	}

	@Test
	public void testGetRoomProperties() {
		assertNotNull(room.getRoomProperties());
	}

}
